﻿using System;
using Jayden.Dll.Core.Persistence;
using Jayden.Dll.Core.Persistence.Attributes;

namespace Jayden.Dll.Entities.Common
{
	[Table]
	public class Post : ObjectBase
	{
		private string m_CultureCode;
		private string m_UserName;
		private DateTime m_CreationDate;
		private string m_Category;
		private DateTime m_DateTime;
		private string m_Author;
		private string m_Title;
		private string m_Body;

		public Post(UnitOfWork uow) : base(uow, 0) { }

		[Field(PrimaryKey = true, AutoIncrement = true)]
		public long PostId { get { return (long)ObjectId[0]; } set { ObjectId[0] = value; } }
		[Field]
		public string CultureCode { get { return m_CultureCode; } set { m_CultureCode = value; } }
		[Field]
		public string UserName { get { return m_UserName; } set { m_UserName = value; } }
		[Field]
		public string Author { get { return m_Author; } set { m_Author= value; } }
		[Field]
		public DateTime CreationDate { get { return m_CreationDate; } set { m_CreationDate = value; } }
		[Field]
		public DateTime DateTime { get { return m_DateTime; } set { m_DateTime = value; } }
		[Field]
		public string Category { get { return m_Category; } set { m_Category = value; } }
		[Field]
		public string Title { get { return m_Title; } set { m_Title = value; } }
		[Field]
		public string Body { get { return m_Body; } set { m_Body = value; } }
	}
}
